prim's algorithm for minimum spanning trees examples